<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<!-- saved from url=(0032)http://demo.b-jui.com/login.html -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>B-JUI 系统登录</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>B-JUI 前端管理框架</title>
    <!-- bootstrap - css -->
    <link href="../../com/B-JUI/themes/css/bootstrap.css" rel="stylesheet">
    <!-- core - css -->
    <link href="../../com/B-JUI/themes/css/style.css" rel="stylesheet">
    <link href="../../com/B-JUI/themes/blue/core.css" rel="stylesheet">
    <link href="../../com/B-JUI/themes/css/fontsize.css" rel="stylesheet">
    <!-- plug - css -->
    <link href="../../com/B-JUI/plugins/kindeditor_4.1.11/themes/default/default.css" rel="stylesheet">
    <link href="../../com/B-JUI/plugins/colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
    <link href="../../com/B-JUI/plugins/nice-validator-1.0.7/jquery.validator.css" rel="stylesheet">
    <link href="../../com/B-JUI/plugins/bootstrapSelect/bootstrap-select.css" rel="stylesheet">
    <link href="../../com/B-JUI/plugins/webuploader/webuploader.css" rel="stylesheet">
    <link href="../../com/B-JUI/themes/css/FA/css/font-awesome.min.css" rel="stylesheet">
    <!-- Favicons -->
    <link rel="apple-touch-icon-precomposed" href="https://seandragon.github.io/head.jpg">
    <link rel="shortcut icon" href="https://seandragon.github.io/head.jpg">
    <!--[if lte IE 7]>
    <link href="/com/B-JUI/themes/css/ie7.css" rel="stylesheet">
    <![endif]-->
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lte IE 9]>
    <!-- jquery -->
    <script src="/com/B-JUI/js/jquery.min.js"></script>
    <!-- other plugins -->
    <style type="text/css">
        html, body {
            height: 100%;
            overflow: hidden;
        }

        body {
            font-family: "Verdana", "Tahoma", "Lucida Grande", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
            background: url(/image/admin/login/login.jpg) no-repeat center center fixed;
            background-size: cover;
        }

        .form-control {
            height: 37px;
        }

        .main_box {
            position: absolute;
            top: 45%;
            left: 50%;
            margin: -200px 0 0 -180px;
            padding: 15px 20px;
            width: 360px;
            height: 400px;
            min-width: 320px;
            background: #FAFAFA;
            background: rgba(255, 255, 255, 0.5);
            box-shadow: 1px 5px 8px #888888;
            border-radius: 6px;
        }

        .login_msg {
            height: 30px;
        }

        .input-group > .input-group-addon.code {
            padding: 0;
        }

        #captcha_img {
            cursor: pointer;
        }

        .main_box .logo img {
            height: 35px;
        }

        @media (min-width: 768px) {
            .main_box {
                margin-left: -240px;
                padding: 60px 55px;
                width: 480px;
            }

            .main_box .logo img {
                height: 40px;
            }
        }
    </style>
    <script type="text/javascript">
        var COOKIE_NAME = 'sys_em_username';
        //判断是否在子页面
        if (!($(".navtabPage").html() === null || $(".navtabPage").html() === "" || $(".navtabPage").html() === undefined)) {
            top.location.href = "/adminLogin";
        }
    </script>
<body style="background-image: url(/image/admin/login/login.jpg);">
<div id="login_submit_id_cl">
    <!--[if lte IE 7]>
    <style type="text/css">
        #errorie {
            position: fixed;
            top: 0;
            z-index: 100000;
            height: 30px;
            background: #FCF8E3;
        }

        #errorie div {
            width: 900px;
            margin: 0 auto;
            line-height: 30px;
            color: orange;
            font-size: 14px;
            text-align: center;
        }

        #errorie div a {
            color: #459f79;
            font-size: 14px;
        }

        #errorie div a:hover {
            text-decoration: underline;
        }
    </style>
    <div id="errorie">
        <div>您还在使用老掉牙的IE，请升级您的浏览器到 IE8以上版本 <a target="_blank"
                                              href="http://windows.microsoft.com/zh-cn/internet-explorer/ie-8-worldwide-languages">点击升级</a>&nbsp;&nbsp;强烈建议您更改换浏览器：<a
                href="http://down.tech.sina.com.cn/content/40975.html" target="_blank">谷歌 Chrome</a></div>
    </div>
    <![endif]-->
    <div class="container">
        <div class="main_box">
            <form action="/admin/login" id="login_form_cl" method="post">
                <input type="hidden" value="" id="j_randomKey">
                <input type="hidden" id="token_id" name="operator_login_token" value="${operator_login_token}">
                <p class="text-center logo"><img src="/image/admin/login/login.jpg" height="45"></p>
                <div class="login_msg text-center"><font color="red"></font></div>
                <div class="form-group">
                    <div class="input-group">
                        <span style="color: red;" id="msg_cl"></span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group">
                    <span class="input-group-addon" id="sizing-addon-user"><span
                            class="glyphicon glyphicon-user"></span></span>
                        <input type="text" class="form-control input_focus_cl" id="j_username" name="userName" value=""
                               placeholder="登录账号"
                               aria-describedby="sizing-addon-user">
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group">
                    <span class="input-group-addon" id="sizing-addon-password"><span
                            class="glyphicon glyphicon-lock"></span></span>
                        <input type="password" class="form-control input_focus_cl" id="login_ok_cl" name="password"
                               placeholder="登录密码"
                               aria-describedby="sizing-addon-password">
                    </div>
                </div>
                <div class="text-center">
                    <button type="button" id="login_submit_cl" class="btn btn-primary btn-lg">&nbsp;登&nbsp;录&nbsp;
                    </button>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="reset" class="btn btn-default btn-lg">&nbsp;重&nbsp;置&nbsp;</button>
                </div>
                <div class="text-center">
                    <hr>
                    MT项目后台登录
                </div>
            </form>
        </div>
    </div>

    <div style="position: static; width: 0px; height: 0px; border: none; padding: 0px; margin: 0px;">
        <div id="trans-tooltip">
            <div id="tip-left-top" style=""></div>
            <div id="tip-top" style=""></div>
            <div id="tip-right-top" style=""></div>
            <div id="tip-right" style=""></div>
            <div id="tip-right-bottom" style=""></div>
            <div id="tip-bottom" style=""></div>
            <div id="tip-left-bottom"></div>
            <div id="tip-left"></div>
            <div id="trans-content"></div>
        </div>
        <div id="tip-arrow-bottom"></div>
        <div id="tip-arrow-top"></div>
    </div>
    <div class="_bd_ext_tip" style="visibility: hidden;">
        <span class="_bd_ext_search">百度一下</span>
        <span class="_bd_ext_open">打开链接</span>
        <span class="_bd_ext_copy">复制</span>
    </div>
</div>
</body>

<script>

    $(function () {
        $("#login_submit_id_cl").keydown(function (e) {
            if (e.which === 13) {
                $("#login_submit_cl").click();
            }
        });

        $('.input_focus_cl').focus(function () {
            $("#msg_cl").html('');
        });

        $("#login_submit_cl").one('click',login);

    });

    /**
     * 提交保存信息
     */
    function login() {
        $.ajax({
            type: "get",
            url: '/admin/login',
            data: $("#login_form_cl").serialize(),
            dataType: "json",
            success: function (jsonResult) {
                if (jsonResult.haveError) {
                    $("#msg_cl").html(jsonResult.errMsg);
                } else {
                    location.href = jsonResult.data;
                }
                $("#login_submit_cl").one('click',login);
            }
        });
    }
</script>
</html>